﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Main.Master" CodeBehind="associations.aspx.vb" Inherits="IsisAssoWeb.associations1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMainContent" runat="server">
     <asp:Panel ID="PanelEditAsso" runat="server" ClientIDMode="Static">
         <% If Request.QueryString("action") = "" Then%>
         <h2>Détail de l'Association</h2>
         <%=GetAssociationDetail(Request.QueryString("id_asso") ) %>
         <h2>Administrateurs et Utilisateurs</h2>
         <h2>Types de Membres</h2>
         <h2>Types de Transactions</h2>
         <h2>Types de Paiements</h2>
         <% End If%>


         </asp:Panel>
    <asp:Panel ID="PanelListAsso" runat="server">
        <h2>Liste des Associations</h2>
         <asp:GridView ID="GridViewListAsso" runat="server" AutoGenerateColumns="False" CellPadding="2" CellSpacing="2">


            <Columns> 
<asp:TemplateField HeaderText="Nom de l'Association" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="Middle"> 
<ItemTemplate>
<asp:HyperLink ID="HyperLinkDetail" runat="server" NavigateUrl='<%# "/associations.aspx?id_asso=" & DataBinder.Eval(Container.DataItem, "id_asso")%>' Text='<%# DataBinder.Eval(Container.DataItem, "nom_asso")%>'></asp:HyperLink>
</ItemTemplate>
    <HeaderStyle HorizontalAlign="Center" Width="250px" />
    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>

<asp:TemplateField HeaderText="Ville"  HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="left" ItemStyle-VerticalAlign="Middle"> 
<ItemTemplate> 
<asp:Label ID="LabelVille" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "adresse_ville")%>'></asp:Label></ItemTemplate>
    <HeaderStyle HorizontalAlign="Left" Width="180px" />
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
                </asp:TemplateField>

<asp:TemplateField HeaderText="Téléphone"  HeaderStyle-Width="80" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="Middle"> 
<ItemTemplate> 
<asp:Label ID="LabelTelephone" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "telephone")%>'></asp:Label></ItemTemplate>
    <HeaderStyle HorizontalAlign="Center" Width="150px" />
    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
</Columns>
<EmptyDataTemplate> 
<asp:Label ID="Label1" runat="server" CssClass="highlight" Text="Vous ne gérez actuellement aucune association, vous pouvez ajouter une nouvelle association en cliquant sur le bouton ci-dessous."></asp:Label></EmptyDataTemplate>


        </asp:GridView>
        <asp:Button ID="ButtonCreateAsso" runat="server" Text="Gérer une nouvelle association" ClientIDMode="Static" />
    </asp:Panel>

    <asp:Panel ID="PanelCreateAsso" runat="server">
         <h2>Création d'Association</h2>
         <table>
            <tr>
                <td>Activité</td>
                <td>
                    <asp:DropDownList ID="activites" runat="server">
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td>Nom de L'Association</td>
                <td>
                    <asp:TextBox ID="nom_asso" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>Adresse (Ligne 1)</td>
                <td>
                    <asp:TextBox ID="adresse_l1" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>Adresse (Ligne 2)</td>
                <td>
                    <asp:TextBox ID="adresse_l2" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>Adresse (Ligne 3)</td>
                <td>
                    <asp:TextBox ID="adresse_l3" runat="server"></asp:TextBox></td>
            </tr>

             <tr>
                <td>Code Postal</td>
                <td>
                    <asp:TextBox ID="adresse_cp" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Ville</td>
                <td>
                    <asp:TextBox ID="adresse_ville" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Téléphone</td>
                <td>
                    <asp:TextBox ID="telephone" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Télécopie</td>
                <td>
                    <asp:TextBox ID="telecopie" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Adresse Email</td>
                <td>
                    <asp:TextBox ID="email" runat="server"></asp:TextBox></td>
            </tr>
             

            <tr>
                <td colspan="2">
                    <asp:Button ID="ButtonSubmit" runat="server" Text="Créer votre association" /></td>
            </tr>
        </table>
    </asp:Panel>

     <asp:Panel ID="PanelErrorCreateAsso" runat="server" Visible="false">

        <asp:Literal ID="MsgError" runat="server"></asp:Literal>
        <br />
        <asp:Button ID="ButtonTryAgain" runat="server" Text="Recommencer" />


    </asp:Panel>
    <asp:Panel ID="PanelFormConfirm" runat="server" Visible="false">
        <p>Votre association est créée, vous pouver personnaliser celle-ci dans le menu appropriée dans "Associations".</p>
        <p><a href="/associations.aspx">Associations</a></p>
    </asp:Panel>
    

</asp:Content>
